//
// Created by v on 2025/11/18.
//

#ifndef JKLIBS_CMRECORDSERVICE_H
#define JKLIBS_CMRECORDSERVICE_H

#include "CMStorageRecord.h"
#include "CMRecordServiceInterface.h"

class CMRecordConfig;

class CMRecordService : public CMRecordServiceInterface
{
public:
    CMRecordService();
    virtual ~CMRecordService();
    int init() override;
    int deinit() override;
    int ctl(int type, void *args) override;

    int pushData(unsigned char *data, size_t size);

  protected:
    int run() override;

private:
    CMStorageManager *pri_manager;
    CMStorageRecord *pri_record;
    CMRecordConfig *pri_config;
};

#endif // JKLIBS_CMRECORDSERVICE_H
